Skip to content

Update all supported postgresql versions (Fixes CVE-2018-16850)#49906

Merged
c0bw3b merged 6 commits intoNixOS:stagingfrom
lsix:update_postgresql
Nov 14, 2018
Merged

Update all supported postgresql versions (Fixes CVE-2018-16850)#49906
c0bw3b merged 6 commits intoNixOS:stagingfrom
lsix:update_postgresql

Conversation

@lsix
Copy link
Member

@lsix lsix commented Nov 8, 2018

Motivation for this change

There have been a release for all the supported postgresql versions.

See https://www.postgresql.org/about/news/1905/ for release information.

Fixes CVE-2018-16850

Once merged, I’ll port those updates to release-18.03 and release-18.09.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@lsix lsix requested a review from thoughtpolice as a code owner November 8, 2018 14:41
@lsix
Copy link
Member Author

lsix commented Nov 8, 2018

postgresql-10 (and less probable postgresql-11) users using pg_stat_statements will need to run ALTER EXTENSION pg_stat_statements UPDATE;. I am not sure if we have way to notify users about that…

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Nov 8, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/2yfsndf94xzw0lw1l9yr0ja48jw2ramk-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc
checking for references to /build in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man
gzipping man pages under /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man
checking for references to /build in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man...

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/5lnvs61q66ysq3napnc3sz0lalk4gsll-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc
checking for references to /build in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man
gzipping man pages under /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man
checking for references to /build in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man...

@c0bw3b c0bw3b added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Nov 8, 2018
@thoughtpolice
Copy link
Member

postgresql-10 (and less probable postgresql-11) users using pg_stat_statements will need to run ALTER EXTENSION pg_stat_statements UPDATE;. I am not sure if we have way to notify users about that…

This is really the traditional mechanism for doing upgrades on extensions, but yes, I don't know of any way to force it. I don't even think e.g. Debian/Ubuntu packages will do any forced alterations like this (after all, you could have completely changed the permissions for all connected users, and any automated scripts couldn't know this a priori.)

It might be best just to post an update to Discourse? Or maybe we should have some better news feed for things like this...

@lsix
Copy link
Member Author

lsix commented Nov 8, 2018

Yes, sure, it is quite standard to do on when updating postgresql with extensions.

While reading the update recommendations on the release note, I just told myself that when ported to release-18.09, users might end runing a nixos-rebuild switch --upgrade or equivalent and miss it. But there is nothing new under the sun here, it happened already and will happen again !

This was just a remark, and I’ll probably drop a discourse comment about that.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 9, 2018

Maybe this should target staging given the number of rebuilds?
Then it could be merged with other sec-related PRs

@lsix lsix force-pushed the update_postgresql branch from 55199fb to 528978f Compare November 9, 2018 08:34
@lsix lsix changed the base branch from master to staging November 9, 2018 08:34
@lsix
Copy link
Member Author

lsix commented Nov 9, 2018

@c0bw3b I have just rebased to staging a changed the PR's base.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: stdenv Standard environment 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 2.status: merge conflict This PR has merge conflicts with the target branch and removed 6.topic: erlang General-purpose, concurrent, functional high-level programming language labels Nov 9, 2018
@GrahamcOfBorg GrahamcOfBorg removed 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: stdenv Standard environment 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 2.status: merge conflict This PR has merge conflicts with the target branch labels Nov 9, 2018
@lsix lsix force-pushed the update_postgresql branch from 528978f to 3cbc20e Compare November 9, 2018 08:43
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/7n26qdcrsr58g5yzfkhgnkd3digy4p03-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc
strip is /nix/store/xzn29jrdk6czmx5qai15v6hwsrxviw4c-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc
checking for references to /build in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man
gzipping man pages under /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man/share/man/
strip is /nix/store/xzn29jrdk6czmx5qai15v6hwsrxviw4c-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man
checking for references to /build in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/lx90m7zlc0gg1nynsb1rb1zyfnb8qcc2-postgresql-10.6-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc
strip is /nix/store/426i2d272x6c8j4shwl1377xj2cf1ijj-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc
checking for references to /build in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man
gzipping man pages under /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man/share/man/
strip is /nix/store/426i2d272x6c8j4shwl1377xj2cf1ijj-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man
checking for references to /build in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man...

@c0bw3b c0bw3b merged commit 8582a82 into NixOS:staging Nov 14, 2018
@lsix lsix deleted the update_postgresql branch August 22, 2019 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants